package com.google.gwt.vector.client.ui;

import com.google.gwt.user.client.Element;
import com.google.gwt.vector.client.Vector;

public class Line extends BasicShape {

	private Line(Element elem) {
		super(elem);
	}

	public Line(double startX, double startY, double endX, double endY) {
		this(Vector.createLine());
	    this.setFrom(startX, startY);
	    this.setTo(endX, endY);
	    setColor(Color.BLACK);
	    setStrokeColor(Color.BLACK);
	    setStrokeWidth(1);
	}

	public void setFrom(double x, double y) {
	    Vector.setFrom(getElement(), x, y);
	}

	public void setTo(double x, double y) {
	    Vector.setTo(getElement(), x, y);
	}

}
